package com.txts.road.app.message.model.entity;

import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableName;
import com.txts.road.app.common.base.BaseEntity;

/**
 * 消息会话实体对象
 *
 * @author baoyr
 * @since 2025-07-17 10:45
 */
@Getter
@Setter
@TableName("road_t_message_session")
public class MessageSessionEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    private Long userId;
    /**
     * 联系人用户ID
     */
    private Long contactUserId;
    /**
     * 最后一条消息ID
     */
    private Long lastMessageId;
    /**
     * 最后消息时间
     */
    private LocalDateTime lastMessageTime;
    /**
     * 未读消息数
     */
    private Integer unreadCount;
    /**
     * 是否删除：0-否，1-是
     */
    private Integer isDeleted;
    /**
     * 创建时间
     */
    private LocalDateTime createdTime;
    /**
     * 创建人id
     */
    private Long createdBy;
    /**
     * 更新人id
     */
    private Long updateBy;
    /**
     * 0-有效 1-删除
     */
    private Integer state;
}
